CC = g++
CFLAGS = -Wall -g -pedantic
PROG = main.exe
LIBS   = -lglut -lGLU -lGL -lGLEW 
SRCS = main.cpp BezierCuadCurve.o BezierCubCurve.o BSplineCuadCurve.o BSplineCubCurve.o

all: $(PROG) ejecutar clean

BezierCuadCurve.o: BezierCuadCurve.cpp BezierCuadCurve.h
	$(CC) $(CFLAGS) -c BezierCuadCurve.cpp

BezierCubCurve.o: BezierCubCurve.cpp BezierCubCurve.h
	$(CC) $(CFLAGS) -c BezierCubCurve.cpp

BSplineCuadCurve.o: BSplineCuadCurve.cpp BSplineCuadCurve.h
	$(CC) $(CFLAGS) -c BSplineCuadCurve.cpp

BSplineCubCurve.o: BSplineCubCurve.cpp BSplineCubCurve.h
	$(CC) $(CFLAGS) -c BSplineCubCurve.cpp

ejecutar: $(PROG)
	./main.exe

$(PROG):$(SRCS)
	$(CC) $(CFLAGS) -o $(PROG) $(SRCS) $(LIBS)

clean:
	rm -f *.o
	rm -f $(PROG)
